<?php
namespace Home\Controller;
use Think\Controller;
class AboutController extends Controller {
	public function _initialize() {
       $img = D('Img')->order("sort desc")->select();
       if(empty($img)){
       	$this->error('没有轮播图');
       }
       $this->assign('list',$img);

         //联系我们
    $contact = D('Contact')->order('id desc')->find();
    $contact['content'] = html_entity_decode($contact['content']);
      if(empty($contact)){
      	$this->error('没有添加关于我们');
      }	
    $this->assign('contact',$contact);
	}
    public function index(){
      //关于我们
      $about = D('About')->order('id desc')->find();
      $about['content'] = html_entity_decode($about['content']);
      if(empty($about)){
      	$this->error('没有添加关于我们');
      }	
    $this->assign('about',$about);
    //我的团队
    $team = D('Team')->order('sort desc')->limit(0,4)->select();

    $this->assign('team',$team);
   
    $this->display();
 }
}